package me.zk.practice1.s;

import java.util.LinkedList;
import java.util.List;
import java.util.Queue;

/**
 * @author zhangkai
 * @date 2023/7/15 13:13
 */
public class LS_Offer_27 {
    public TreeNode mirrorTree(TreeNode root) {
        swap(root);
        return root;
    }

    public void swap(TreeNode node){
        if (node== null) {
            return;
        }
        TreeNode temp = node.left;
        node.left = node.right;
        node.right = temp;
        swap(node.left);
        swap(node.right);

    }
}
